#include<iostream>
using namespace std;
int main()
{
      long long n,m,a,tot,t1,t2;
      cin>>n>>m>>a;
      t1=n/a;
      t2=m/a;
      tot=t1*t2;
      cout<<tot; 
      return 0;
}
